
<template v-if="!showdata[showdataindex].loading">
	<div class="footer-tabbar-item" v-if="showdata[showdataindex].data.link" @click="FooterClick('link')">
		<van-icon name="link-o" />
	</div>
	<div class="footer-tabbar-item" v-if="showdata[showdataindex].data.download" @click="FooterClick('download')">
		<van-icon name="down" />
	</div>
	<div class="footer-tabbar-item" v-if="parseInt(showdata[showdataindex].data.collection)" @click="FooterClick('collect')">
		<van-icon name="star-o" />
	</div>
	<div class="footer-tabbar-item" v-if="showdata[showdataindex].data.share" @click="FooterClick('share')">
		<van-icon name="share-o" />
	</div>
	<!--{if $_G['adminid']}-->
	<!-- <div class="footer-tabbar-item" @click="gradedata.Visible=true">
		<i class="ri-shield-line"></i>
	</div> -->
	<!--{/if}-->
</template>
<script type="text/javascript">
	var FooterMixin = {
		methods:{
			async FooterClick(type){
				var self = this;
				var path = self.path;
				if(!self.showdata[self.showdataindex]){
					showToast({
						message: '{lang parameter_error}',
						icon: 'cross',
					});
					return false;
				}
				if(type == 'link'){
					window.open(self.showdata[self.showdataindex].data.link);
					return false;
				}
				if(type == 'collect'){
					self.ParamImages.operation.type = 'collect';
					self.ImagesClassify.PopupVisible = true;
					return false;
				}
				if(type == 'download'){
					if(this.previews.data && this.previews.data.length && this.previews.active > 0){
						if(self.isadmin){
							window.open('index.php?mod=pichome&op=download&dpath=' + this.previews.data[this.previews.active].dpath);
						}else{
							window.open('index.php?mod=banner&op=download&dpath=' + this.previews.data[this.previews.active].dpath);
						}
					}else{
						if (self.showdata[self.showdataindex].data.dpath) {

							if(self.isadmin){
								window.open('index.php?mod=pichome&op=download&dpath=' + self.showdata[self.showdataindex].data.dpath);
							}else{
								window.open('index.php?mod=banner&op=download&dpath=' + self.showdata[self.showdataindex].data.dpath);
							}
							} else {
								showToast({
									message: '{lang data_error}',
									icon: 'cross',
								});
							}
					}

					
					return false;
				}
				if(type == 'share'){
					let self = this;
					self.shareDialog.id=self.showdata[this.ridIndex].data.rid;
					self.shareDialog.stype=0;
					self.shareDialog.visible=true;
				}
			},
		}
	};
</script>